﻿using System;

namespace Microsoft.SPOT.Hardware
{
    public static class Utility
    {
        public static byte[] CombineArrays(byte[] src1, byte[] src2)
        {
            byte[] result = new byte[src1.Length + src2.Length];
            Buffer.BlockCopy(src1, 0, result, 0, src1.Length);
            Buffer.BlockCopy(src2, 0, result, src1.Length, src2.Length);
            return result;
        }

        public static byte[] ExtractRangeFromArray(byte[] data, int offset, int count)
        {
            byte[] result = new byte[count];
            Buffer.BlockCopy(data, offset, result, 0, count);
            return result;
        }

        public static void SetLocalTime(DateTime value)
        {
            Console.WriteLine("SetLocalTime: " + value);
        }

        public static DateTime GetMachineTime()
        {
            return DateTime.Now;
        }
    }
}
